<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ include file="/website/layout/tag.jsp"%>

<script type="text/javascript">
	$(document).ready(
		function() {
			//事件注册.
			$("#searchBtn").click(searchMember);
			$("#restartBtn").click(restartMember);
			
			//checkbox控件事件注册.
			$("[name='chkAll']").each(
				function() {
					$(this).click(function() {
						checkAll("chkAll", "chkEach");
					});
				}
			);
			$("[name='chkEach']").each(
				function() {
					$(this).click(function() {
						checkEach("chkAll", "chkEach");
					});
				}
			);
			
			//设置左菜单对应菜单CSS为选中状态.
			changeToActiveCss("menu_6020");
			
			//消息显示.
			var msg = '<c:out value="${msg}"/>';
			if (msg != "") {
				alert(msg);
			}
		}
	);
	
	function searchMember() {
		$("#searchForm").submit();
	}
	
	function restartMember() {
		var checkObjs = $(":checkbox[name='chkEach']:checked");
		var len = checkObjs.length;
		if (len == 0) {
			alert("请选择要解除屏蔽的会员.");
			return false;
		}
		
		if (len > 1) {
			alert("请只选择一条会员.");
			return false;
		}
		
		if (confirm("是否解除屏蔽会员?")) {
			$("#sysId").val(checkObjs[0].value);
			$("#searchForm").attr("action", "${pageContext.request.contextPath}/member/restartMember.do");
			$("#searchForm").submit();
		}
	}
</script>

<div id="content_right">
	<div style="width:100%;height:35px;line-height:35px;text-align:left;background-color:#F5FAFA;font-weight:bold; ">订单 > 其他 > 黑名单列表</div>
	<div id="searchArea">
		<table width="100%" cellspacing="0">
			<tr>
				<td align="right" style="width:60px; ">屏蔽时间:</td>
				<td align="left" style="width:250px; ">
				
				</td>
				<td align="right" style="width:60px; ">会员名:</td>
				<td align="left">
				</td>
				<td align="right" style="width:60px; ">联系电话:</td>
				<td align="left">
				<td>
				</td>
			</tr>
			<tr>
				<td colspan="7">
					<div class="buttons" style="float:right; margin-right:40px;">
						<a id="searchBtn" href="#">
							<img src="../images/btn_search.gif" alt=""/> 
							检索
						</a>
					</div>
				</td>
			</tr>
		</table>
	</div>
	<div id="btnArea">
		<div class="buttons">
			<a id="restartBtn" href="#">
				<img src="../images/btn_textfield_key.png" alt=""/> 
				解除黑名单
			</a>
		</div>
	</div>
	<div style="clear:both; "></div>
	<div id="resultArea" style="height:400px; ">
		<table class="dataTable" cellspacing="0"> 
			<tr> 
			<th scope="col" width="26px;"><input type="checkbox" name="chkAll"/></th> 
			<th scope="col" width="120px">屏蔽日期</th> 
			<th scope="col" width="100px">用户ID</th>
			<th scope="col" width="75px">会员名</th>  
			<th scope="col" width="80px">手机</th>
			<th scope="col" width="80px">电话</th> 
			<th scope="col" width="100px">电子邮件</th> 
			<th scope="col" width="235px">地址</th>
			<th scope="col" >屏蔽备注</th>
			</tr> 
			<tr> 
				<td class="row"> <input type="checkbox" name="chkEach" value="#"/></td>
				<td class="row">#</td> 
				<td class="row">#</td> 
				<td class="row">#</td>
				<td class="row">#</td>
				<td class="row">#</td>
				<td class="row">#</td>
				<td class="row">郴州市苏仙区橘井路卧龙大院6-11</td>
				<td class="row" style"text-align:left;>#</td> 
			</tr> 
		</table> 
	</div>
</div>